#pragma once
#include<iostream>
#include<deque>
#include <vector>

using namespace std;

namespace YC
{
    template<class T, class Con = deque<T>>
    class queue
    {
    public:
        void push(const T& x)
        {
            _c.push_back(x);
        }

        void pop()
        {
            _c.pop_front();
        }

        T& back()
        {
            return _c.back();
        }

        T& front()
        {
            return _c.front();
        }

        size_t size() const
        {
            return _c.size();
        }

        bool empty() const
        {
            return _c.empty();
        }
    private:
        Con _c;
    };

    void test_queue1()
    {
        queue<int> q;
        q.push(1);
        q.push(2);
        q.push(3);
        q.push(4);

        while (q.size())
        {
            cout << q.front() << ' ';
            q.pop();
        }
        cout << endl;
    }
}